package hpu.e4_demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import hpu.e4_demo.entity.Yuyue;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface YuyueMapper extends BaseMapper<Yuyue> {

    IPage<Yuyue> findAll(IPage<Yuyue> page, @Param("status") Integer status);

    List<Yuyue> findByCheliangId(@Param("cheliangId") Integer cheliangId);

    List<Yuyue> findByUserId(@Param("userId") Integer userId);

    int updateStatus(@Param("id") Integer id, @Param("status") Integer status);
}